
function open(){
    buttonlist = document.getElementsByTagName("button")
    for(var i = 0; i < buttonlist.length; i++){

        if(buttonlist[i].children.length > 0 && buttonlist[i].children[0].innerText == "已同意"){
            buttonlist[i].children[0].style.backgroundColor = "transparent"
            buttonlist[i].children[0].innerText = "已同意"
            buttonlist[i].children[0].classList.add("disabled")
        }
    }
}

function  agree(button) {
    var id = button.name
    button.innerText = "已同意"
    button.classList.add("disabled")
    $.ajax({
        type:"post",
        url:"/agreeLeaveItem",
        data:{"lid":id},
        dateType:"json",
        success:function (result) {
            if(result.data){
                button.style.backgroundColor = "transparent"
                button.innerText = "已同意"
                button.classList.add("disabled")
            }
        }
    })
    console.info(id)
}
function  refuse(button) {
    var id = button.name
    console.info(id)
}